// PropertiesPane.cpp : implementation file
//

#include "stdafx.h"
#include "MotionControlSoftware.h"
#include "PropertiesPane.h"


// CPropertiesPane

IMPLEMENT_DYNAMIC(CPropertiesPane, CDockablePane)

CPropertiesPane::CPropertiesPane()
{

}

CPropertiesPane::~CPropertiesPane()
{
}


BEGIN_MESSAGE_MAP(CPropertiesPane, CDockablePane)
	ON_WM_CREATE()
	ON_WM_SIZE()
	ON_WM_DESTROY()
	ON_WM_CONTEXTMENU()
	ON_WM_SHOWWINDOW()
END_MESSAGE_MAP()



// CPropertiesPane message handlers



int CPropertiesPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CDockablePane::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO:  Add your specialized creation code here
	m_propertyView.Create(IDD_DLG_PropertyPane,this);
	m_propertyView.ShowWindow(SW_SHOW);
	return 0;
}


void CPropertiesPane::OnSize(UINT nType, int cx, int cy)
{
	CDockablePane::OnSize(nType, cx, cy);

	// TODO: Add your message handler code here
	if (m_propertyView.GetSafeHwnd())
	{
		CRect rct;
		GetClientRect(&rct);
		m_propertyView.MoveWindow(rct);
	}

}


void CPropertiesPane::OnDestroy()
{
	CDockablePane::OnDestroy();

	// TODO: Add your message handler code here
	m_propertyView.DestroyWindow();
}


void CPropertiesPane::OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/)
{
	// TODO: Add your message handler code here
}


void CPropertiesPane::OnShowWindow(BOOL bShow, UINT nStatus)
{
	CDockablePane::OnShowWindow(bShow, nStatus);

	// TODO: Add your message handler code here
	m_propertyView.UpdateDoc();
}
